Ext.onReady(function(){
    var gridStore = Ext.create('Ext.data.Store', {
        fields: ["id","comboxText","buildingArea", "innerArea", "price","totalPrice","discountRate","floatingRange"],
        remoteSort: false,
        proxy: {
            type: 'ajax',
            url: contextPath+'/marketing/priceScheme/findRoomList?id='+priceSchemeId+'&treeId=-1',
            reader: {   
                type: 'json', 
                root: 'rows',  
                totalProperty: 'total' 
            }
        },
        autoLoad: true  //即时加载数据
    });
	var columns_2 = [{
      	  text: '房号',
          dataIndex: 'comboxText',
          width:400
    },{   
    	text: '建筑面积', 
        dataIndex: 'buildingArea'
    },{
    	text: '套内面积', 
        dataIndex: 'innerArea'
    },{
    	text: '表单价', 
        dataIndex: 'price'
        
    },{
    	text: '表总价', 
        dataIndex: 'totalPrice'
    },{
    	text: '底价', 
        dataIndex: 'discountRate'
    },{
    	text: '浮动范围', 
        dataIndex: 'floatingRange'
    }];

		var row_2=Ext.create('Ext.grid.Panel', {
			titleAlign:'left',
			title:"方案详情",
			minHeight:200,
			colspan:2,
			columnLines: true,
	        viewConfig: {
	            stripeRows: true
	        },
			store : gridStore,
			columns : columns_2
		});
		
		var processHistoryPanel=Ext.create('component.proces.history',{
			 processInstanceId: procInstId,
			 minHeight:100,
			 colspan:2,
			 contextPath:contextPath
		});
		processHistoryPanel.setAutidStatusName(auditStatus);
		processHistoryPanel.setProcesHistoryVisible(processFlag);
		
		var fileAttachment = Ext.create('component.file.attachment',{
		    objectId: businessAbnormaId,
		    imageType: "6",
		    contextPath:contextPath,
		    colspan:2
		});
		
	   var fromPanelInfo = Ext.create('Ext.form.FormPanel',{
		    renderTo:Ext.getBody(),
		    titleAlign:'center',
	        title:'价格失效申请审批单',
		    border: true,
		    layout:{
		    	 type: 'table',
                 columns: 2,
                 tableAttrs: {　　//在这儿控制table标签中的Attrs属性
                     border: 1,
                     cellpadding: 5,
                     cellspacing: 1,
                     width: '95%',
                     align: 'center',
                     style: "border:1px solid gray;border-collapse:collapse;margin:0 auto;text-align:center;"
                 },
                 tdAttrs: {　　//控制td标签的属性，以上用法都是在ext的api中查到，同样的方式可以给tr添加属性
                     width: '100px',
                     height: '40px',
                     style: "padding:5px",
                     valign: 'middle'
                 }
		    },
			 items:[{
				    xtype:'displayfield',
				    fieldLabel: '方案名称',
				    name: 'name'
				},{
				    xtype:'displayfield',
				    fieldLabel: '方案房产',
				    name: 'secheme'
				},{
				    xtype:'displayfield',
				    fieldLabel: '计价方式',
				    name: 'valuationType',
				    renderer:function(val){
						////00待审核 01审核通过 02审核不通过 10已生效 20失效
				    	 if(val=="1"){
							 return "建筑面积";
						 }else if(val=="2"){
							 return "套内面积";
						 }else if(val=="3"){
							 return "套(别墅/排屋)";
						 }else if(val=="4"){
							 return "个(车位)";
						 }else{
							 return "";
						 }
				    	 
					}
				},{
				    xtype:'displayfield',
				    fieldLabel: '方案执行日期',
				    name: 'executionDate'
				},{
				    xtype:'displayfield',
				    fieldLabel: '方案说明',
				    colspan:2,
				    name: 'remark'
				},{
				    xtype:'displayfield',
				    fieldLabel: '创建人',
				    name: 'createCN'
				},{
				    xtype:'displayfield',
				    fieldLabel: '创建时间',
				    name: 'createTime'
				},row_2,{
				    xtype:'displayfield',
				    fieldLabel: '失效原因',
				    name:'invalidRemark',
				    width:780,
				    align:'left',
				    colspan:2
				},fileAttachment,processHistoryPanel]
	   });
	   fromPanelInfo.getForm().setValues(priceScheme);
	  
});